package com.lh.common.entity.admin;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lh.common.annotation.ExcelExportRule;
import com.lh.common.annotation.ExcelFile;
import com.lh.common.enums.IF;
import com.lh.common.enums.IsDel;
import com.lh.common.enums.ShopTypeEnum;
import com.lh.common.enums.UpperLowerShelfStatus;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.ibatis.type.Alias;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
 * ovmal_shop:商品表
 * @author Administrator 2020-05-09
 */
@TableName("ovmal_shop")
@Alias("shop")
@Data
@ExcelFile(titleName = "商品信息")
public class Shop implements Serializable {
    @ApiModelProperty(value = "")
    @TableField(value = "sid")
    @TableId
    private Long sid;

    @ApiModelProperty(value = "商品名称",allowEmptyValue=true,required = true)
    @ExcelExportRule(label = "商品名称")
    @Column(name = "name")
    private String name;

    @ApiModelProperty(value = "商品分类 ONE:一元抢购 SHOP:普通商品",allowEmptyValue=true,required = true)
    @Column(name = "type")
    private ShopTypeEnum type;

    @ApiModelProperty(value = "商品价格",allowEmptyValue=true,required = true)
    @ExcelExportRule(label = "商品价格")
    @Column(name = "price")
    private BigDecimal price;

    @ApiModelProperty(value = "商品成本价",allowEmptyValue=true,required = true)
    @ExcelExportRule(label = "商品成本价")
    @Column(name = "singleprice")
    private BigDecimal singleprice;

    @ApiModelProperty(value = "封面图链接")
    @ExcelExportRule(label = "封面图链接")
    @Column(name = "mainimg")
    private String mainimg;

    @ApiModelProperty(value = "图片链接",allowEmptyValue=true,required = true)
    @Column(name = "img")
    private String img;

    @ApiModelProperty(value = "商品属性 key:value",allowEmptyValue=true,required = true)
    @ExcelExportRule(label = "商品属性")
    @Column(name = "property")
    private String property;

    @ApiModelProperty(value = "是否包邮 YES:包邮; NO:不包邮")
    @Column(name = "is_freight")
    private IF isFreight;

    @ApiModelProperty(value = "首件运费")
    @Column(name = "first_freight")
    private BigDecimal firstFreight;

    @ApiModelProperty(value = "次件运费")
    @Column(name = "no_first_freight")
    private BigDecimal noFirstFreight;

    @ApiModelProperty(value = "商品状态  UpperShelf:上架 LowerShelf: 下架")
    @Column(name = "status")
    private UpperLowerShelfStatus status;

    @ApiModelProperty(value = "")
    @Column(name = "create_time")
    private Date createTime;

    @ApiModelProperty(value = "")
    @Column(name = "update_time")
    private Date updateTime;

    @ApiModelProperty(value = "YES:已删除，NO:未删除")
    @Column(name = "is_del")
    private IsDel isDel;

    @ApiModelProperty(value = "商品描述",allowEmptyValue=true,required = true)
    @Column(name = "details")
    private String details;

    @ApiModelProperty(value = "商品分类ID")
    @Column(name = "sort_ids")
    @TableField(exist=false)
    private String sortIds;

    @ApiModelProperty(value = "分类名称")
    @Column(name = "sort_names")
    @TableField(exist=false)
    private String sortNames;

    @ApiModelProperty(value = "是否推荐  YES:是  NO: 否")
    @Column(name = "is_recommend")
    @TableField(exist=false)
    private IF isRecommend;

    /**
     * ovmal_shop
     */
    private static final long serialVersionUID = 1L;
}
